<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%@ taglib prefix="s" uri="/struts-tags"%>

<%@ taglib prefix="odb" uri="/oracle-dashboard"%>


<h2>SHARED POOL STATISTICS</h2>
<p>
	(Reference: <a target='_blank'
		href='http://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_3150.htm#I1023420'>DBA_HIST_LIBRARYCACHE</a>
	, <a target='_blank'
		href='http://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_3163.htm#I1023435'>DBA_HIST_ROWCACHE_SUMMARY</a>
	, <a target='_blank'
		href='http://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_3174.htm#I1023440'>DBA_HIST_SGASTAT</a>
	, <a target='_blank'
		href='http://docs.oracle.com/cd/B28359_01/server.111/b28274/memory.htm#i30970'>Memory
		Tuning</a> , <a target='_blank'
		href='http://docs.oracle.com/cd/B16240_01/doc/doc.102/e16282/oracle_database_help/oracle_database_sga_pool_wastage_shared_free_pct.html'>Shared
		Pool Free Description</a> )
</p>


<span style='font-style:italic; '>
	Current AWR Interval: ${awrsetting.interval} MINUTES
</span>
				
<div id='all-statistics'>
	<div style='position:absolute; right:10px'>
		
		<form id='xysetting'>
		
		Level 1: 
		<select disabled="disabled">
			<option value='6'>1 Day</option>
		</select> &nbsp;
		Level 2: 
		<select name='x_block' id='x_block'>
			<option value='8'>${awrsetting.interval} MINUTES x 8</option>
			<option value='7'>${awrsetting.interval} MINUTES x 7</option>
			<option value='6'>${awrsetting.interval} MINUTES x 6</option>
			<option value='5'>${awrsetting.interval} MINUTES x 5</option>
			<option value='4'>${awrsetting.interval} MINUTES x 4</option>
		</select> &nbsp;
		Level 3:
		<select name='y_block' id='y_block'>
			<option value='1'>${awrsetting.interval} MINUTES x 1</option>
			<option value='2'>${awrsetting.interval} MINUTES x 2</option>
			<option value='3'>${awrsetting.interval} MINUTES x 3</option>
		</select> &nbsp;
		<input type='submit' class='button' value='Apply new aggregation setting'/>
		</form>
	</div>

	<ul>
		<li><a href="#tabs-1">Shared Pool Free</a></li>
		<li><a href="#tabs-2">Library Cache Hit Ratio</a></li>
		<li><a href="#tabs-3">Dictionary Cache Hit Ratio</a></li>
	</ul>

	

	<div id="tabs-1">
		
		<p style='background:#B3A8AC'>
			<odb:ThresholdDisplay statistics='Shared Pool Free %' />		
		</p>
		
		<p>
			- <span style='text-decoration: underline'>Latest Value</span>:
			<odb:LastValue statistics='Shared Pool Free %' />
		</p>

		<p>
			- <span style='text-decoration: underline'>Aggregated Value</span>: 
				<a href='full-report?statistics=Shared Pool Free %' class='full-report'>View Full Report</a>				
			<odb:AggregatedValue statistics='Shared Pool Free %' />
		</p>
	</div>

	<div id="tabs-2">
		
		<p style='background:#B3A8AC'>
			<odb:ThresholdDisplay statistics='Library Cache Hit Ratio' />		
		</p>
		
		<p>
			- <span style='text-decoration: underline'>Latest Value</span>:
			<odb:LastValue statistics='Library Cache Hit Ratio' />
		</p>

		<p>
			- <span style='text-decoration: underline'>Aggregated Value</span>: 
				<a href='full-report?statistics=Library Cache Hit Ratio' class='full-report'>View Full Report</a>
			<odb:AggregatedValue statistics='Library Cache Hit Ratio' />
		</p>
	</div>

	<div id="tabs-3">
		
		<p style='background:#B3A8AC'>
			<odb:ThresholdDisplay statistics='Dictionary Cache Hit Ratio' />		
		</p>
		
		<p>
			- <span style='text-decoration: underline'>Latest Value</span>:
			<odb:LastValue statistics='Dictionary Cache Hit Ratio' />
		</p>

		<p>
			- <span style='text-decoration: underline'>Aggregated Value</span>: 
				<a href='full-report?statistics=Dictionary Cache Hit Ratio' class='full-report'>View Full Report</a>
			<odb:AggregatedValue statistics='Dictionary Cache Hit Ratio' />
	</div>

</div>

<div id='Shared Pool Free %' title='Shared Pool Free %' style='display:none'>
	Some information about Shared Pool Free
</div>
<div id='Library Cache Hit Ratio' title='Library Cache Hit Ratio' style='display:none'>
	Some information about Library Cache Hit Ratio
</div>
<div id='Dictionary Cache Hit Ratio' title='Library Cache Hit Ratio' style='display:none'>
	Some information about Dictionary Cache Hit Ratio
</div>


<script>
	
	
	$(function() {
		$("#all-statistics").tabs();
		$('.full-report').button();
		$("#tabs-1").treeview({
			persist: "location",
			collapsed: true,
			unique: true
		});
		$("#tabs-2").treeview({
			persist: "location",
			collapsed: true,
			unique: true
		});
		$("#tabs-3").treeview({
			persist: "location",
			collapsed: true,
			unique: true
		});
		$('.button').button();
		
		
		if ('${param.x_block}' != "")
			$("#x_block").val('${param.x_block}');
		if ('${requestScope.x_block}' != "")
			$("#x_block").val('${requestScope.x_block}');
		if ('${param.y_block}' != "")
			$("#y_block").val('${param.y_block}');
		if ('${requestScope.y_block}' != "")
			$("#y_block").val('${requestScope.y_block}');
		
		
		
	});
	
</script>
